// components/c-icon/c-icon.js
Component({

  /**
   * 组件的属性列表
   */
  properties: {
    size: {
      type: String,
      value: "mid"
    },
    text1: {
      type: String,
      value: "顶部文本"
    },
    text2: {
      type: String,
      value: "底部文本"
    },
    byRow: {
      type: Boolean,
      value: false
    },
    useD: {
      type: Boolean,
      value: false
    },
    dColor:{
      type:String,
      value:"green"
    },
    width: {
      type: Number,
      value: 350.0
    },
    index: {
      type: String,
      value: "https://img0.baidu.com/it/u=481566388,3453915038&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500"
    },
    useT:{
      type:Boolean,
      value:false
    },
    tSize:{
      type:Number,
      value:30.0
    },
    tColor: {
      type: String,
      value: "#FFC700"
    },
    isUser: {
      type: Boolean,
      value: false
    },
    t1size: {
      type: Number,
      value: 45.0
    },
    t2size: {
      type: Number,
      value: 30.0
    },
    t1color: {
      type: String,
      value: "black"
    },
    t2color: {
      type: String,
      value: "#6C6C6C"
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    useHights: ["100rpx", "120rpx", "150rpx"],
    d_size: ["mini", "mid", "big"],
    useSize: 1,
  },

  /**
   * 组件的方法列表
   */
  methods: {
    
  },
  lifetimes: {
    ready: function () {
      let d_size = this.data.d_size
      for (let i = 0; i < d_size.length; i++) {
        if (this.properties.size == d_size[i]) {
          this.setData({
            useSize: i
          })
          break
        }
      }
    }
  }
})